<template>
  <div>
    <Card dis-hover class="PtwModelListClass">
      <h3>
        作业票审批
      </h3>
      <ButtonGroup slot="extra">
        <Button @click="approvalUpdateInfo()" type="warning" style="background: #EF5350;" :loading="buttonloading"
                v-if="!taskInfo.viewFlag && taskName == '上报人'">
          <Icon type="ios-bookmark"/>
          上报
        </Button>
        <Button @click="approvalInfo" type="warning" style="background: #EF5350;" :loading="buttonloading"
                v-if="!taskInfo.viewFlag && taskName != '上报人'">
          <Icon type="ios-bookmark"/>
          审批
        </Button>
        <Button @click="returnTo">
          返回
          <Icon type="ios-arrow-forward"/>
        </Button>
      </ButtonGroup>
    </Card>
    <div :style="{height: bodyHeight + 'px'}">
      <Spin style="width:100%;heigth:100%;margin-left:45%;margin-top:200px" size="large" v-if="loadingModel"></Spin>
      <Row v-else>
        <Col span="24">
          <Form ref="showdata" :model="showdata" :rules="ruleCustom" :label-width="180" v-if="taskName != '上报人'">
            <Card bordered dis-hover>
              <Row type="flex" justify="space-around" class="code-row-bg">
                <Col span="23">
                  <FormItem label="任务名称：" prop="planName">
                    {{ ptwPlanData.planName }}
                  </FormItem>
                </Col>
              </Row>
              <Row type="flex" justify="space-around" class="code-row-bg">
                <Col span="11">
                  <FormItem label="任务单位类型：" prop="orgType">
                    <RadioGroup disabled v-model="ptwPlanData.orgType" @on-change="changeType">
                      <Radio disabled label="0">内部单位</Radio>
                      <Radio disabled label="1">相关方</Radio>
                    </RadioGroup>
                  </FormItem>
                </Col>
                <Col span="11">
                  <FormItem label="作业时间：" prop="workDate">
                    {{ formatDate(new Date(ptwPlanData.workDate), 'yyyy-MM-dd') }}
                  </FormItem>
                </Col>
              </Row>
              <Row type="flex" justify="space-around" class="code-row-bg">
                <Col span="11">
                  <FormItem label="所属单位：" prop="belongOrgId">
                    {{ ptwPlanData.belongOrgName }}
                  </FormItem>
                </Col>
                <Col span="11">
                  <FormItem label="作业单位：" prop="operateOrgId">
                    {{ ptwPlanData.operateOrgName }}
                  </FormItem>
                </Col>
              </Row>
              <Row type="flex" justify="space-around" class="code-row-bg">
                <Col span="23">
                  <FormItem label="作业描述：" prop="workDesc">
                    {{ ptwPlanData.workDesc }}
                  </FormItem>
                </Col>
              </Row>
            </Card>
            <Card v-if="modelData.modelType=='ptw-100001000000001'" shadow>
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup disabled v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="汽车吊（t）：" prop="craneQuality">
                            {{ ptwData.craneQuality }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="吊装质量（t）：" prop="hoistingQuality">
                            {{ ptwData.hoistingQuality }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="吊装高度（m）：" prop="hoistingHeight">
                            {{ ptwData.hoistingHeight }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <RadioGroup disabled v-model="ptwData.workGrade">
                              <Radio disabled v-for="(item,index) in workGrades" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="司索人员：" prop="cablePeople">
                            {{ ptwData.cablePeople }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="起重指挥：" prop="craneDirect">
                            {{ ptwData.craneDirect }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场指挥：" prop="siteDirect">
                            {{ ptwData.siteDirect }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="起重司机：" prop="craneDriver">
                            {{ ptwData.craneDriver }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyEndDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card v-if="modelData.modelType=='ptw-100001000000002'" shadow>
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup disabled v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyEndDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000006' || modelData.modelType=='ptw-100001000000007'  ">
              <!--清库清仓作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup disabled v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000003'"> <!--有限空间-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup disabled v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <RadioGroup disabled v-model="ptwData.workGrade">
                              <Radio disabled v-for="(item,index) in confinedSpaceWorkGrades" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000004'"> <!--高处作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="基准面（m）：" prop="datumGrade">
                            {{ ptwData.datumGrade }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <RadioGroup disabled v-model="ptwData.workGrade">
                              <Radio disabled v-for="(item,index) in highWorkGrades" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业人员及证号：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000005'"> <!--动火作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <RadioGroup v-model="ptwData.workGrade">
                              <Radio disabled label="ptw-100003000000001">特殊动火</Radio>
                              <Radio disabled label="ptw-100003000000002">一级动火</Radio>
                              <Radio disabled label="ptw-100003000000003">二级动火</Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员及证号：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000008'"> <!--临时用电作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请用电地点：" prop="applyUseElectricSite">
                            {{ ptwData.applyUseElectricSite }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="用电功率：" prop="useElectricPower">
                            {{ ptwData.useElectricPower }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请供电制式：" prop="electricStandard">
                            <RadioGroup v-model="ptwData.electricStandard">
                              <Radio label="1">单相</Radio>
                              <Radio label="2">三相四线</Radio>
                              <Radio label="3">三相五线</Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="电源接入点：" prop="electricAccessPoint">
                            {{ ptwData.electricAccessPoint }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="计划用电天数：" prop="applyUseElectricDay">
                            {{ ptwData.applyUseElectricDay }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="操作类型：" prop="electricType">
                            <RadioGroup disabled v-model="ptwData.electricType">
                              <Radio disabled label="1">安装</Radio>
                              <Radio disabled label="2">拆除</Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="操作时间：" prop="electricWorkTime">
                            {{ formatDate(new Date(ptwData.electricWorkTime), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="验收时间：" prop="electricCheckTime">
                            {{ formatDate(new Date(ptwData.electricCheckTime), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请用电开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请用电结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000009'"> <!--高温作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup disabled v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <RadioGroup disabled v-model="ptwData.workGrade">
                              <Radio disabled label="item.codingCodeId" :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业人员及证号：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000010'"> <!--交叉作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup disabled v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000011'"> <!--动土作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业内容：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workGrade">
                            <RadioGroup disabled v-model="ptwData.workGrade">
                              <Radio disabled v-for="(item,index) in soilWorkGrades" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000010'"> <!--交叉-->
              <p slot="title">相关方列表</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="viewRelatedPartyColumn" :data="relatedPartyDatas">
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000020' || modelData.modelType=='ptw-100001000000021'">
              <!-- 爆破作业，盲炮处理-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup disabled v-model="ptwData.workType">
                              <Radio disabled v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000022'">  <!-- 大型铸件合浇作业-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            {{ ptwData.workCharge }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000025'">  <!-- 断路作业-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请单位：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请人：" prop="adminDeptExpediter">
                            {{ ptwData.adminDeptExpediter }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业编号：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="涉及相关单位（部门）：" prop="colonyDept">
                            {{ ptwData.colonyDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="断路原因：" prop="brokenReason">
                            {{ ptwData.brokenReason }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="断路开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="断路结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="断路地段示意图及相关说明：" prop="brokenExplain">
                            {{ ptwData.brokenExplain }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="附件：" prop="file">
                            <div v-for="fileItem in signFileList" :key='fileItem.id'>
                              <div v-if="fileItem.fileName.indexOf('file')!=-1">
                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                  <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                </router-link>
                              </div>
                            </div>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="危害辨识：" prop="hazardIdentification">
                            {{ ptwData.hazardIdentification }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000024' || modelData.modelType=='ptw-100001000000023'">
              <!-- 清结皮作业-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="管理单位：" prop="adminDept">
                            {{ ptwData.adminDept }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业单位：" prop="workDept">
                            {{ ptwData.workDept }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业地点：" prop="workSite">
                            {{ ptwData.workSite }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业高度：" v-if="modelData.modelType=='ptw-100001000000024'"
                                    prop="workHeight">
                            {{ ptwData.workHeight }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业内容：" prop="projectDesc">
                            {{ ptwData.projectDesc }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人：" prop="workPeople">
                            {{ ptwData.workPeople }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="监护人：" prop="siteGuarder">
                            {{ ptwData.siteGuarder }}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyStartDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            {{ formatDate(new Date(ptwData.applyEndDate), 'yyyy-MM-dd hh:mm') }}
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000023' || modelData.modelType=='ptw-100001000000024'">
              <p slot="title">特种作业人员列表</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="viewPtwWorkerColumn" :data="ptwWorkerDatas">
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card bordered dis-hover :key="item.modelSubId" v-for="(item,index) in workItems" shadow>
              <p slot="title">
                {{ item.parentModelSubName != null ? item.parentModelSubName + "-" : "" }}{{ item.modelSubName }}：{{ item.modelSubDesc }}
              </p>
              <div class="modelSub" v-if="item.modelSubName.indexOf('控制措施')!=-1">
                <Row :class="rowIndex%2==0?detailRow1:detailRow2" v-for="(row,rowIndex) in item.rows" :key="row.itemId">
                  <Col span="6" v-for="child in row" :key="child.itemId"
                       style="padding-left: 10px;border-right: 1px solid #E0E0EC;">
                    <span v-if="child.itemId!=undefined && child.dataType=='3'" style="color:red">*</span>
                    <span v-if="child.itemId!=undefined && child.dataType!='2'">{{ child.itemName }}<br>
                                            <RadioGroup v-model="child.instanceContent">
                                                <Radio disabled label="1">是</Radio>
                                                <Radio disabled label="0">否</Radio>
                                            </RadioGroup>
                                        </span>
                    <span v-if="child.itemId!=undefined && child.dataType=='2'">{{ child.itemName }}<br>
                                            <Poptip trigger="hover" title="" placement="left">
                                                <div slot="content">
                                                    <p style="white-space: normal">{{ child.instanceContent }}</p>
                                                </div>
                                                <input type="text" style="height: 35px" v-model="child.instanceContent"
                                                       @change="getChildPosition(index,child.itemId,child.instanceContent)"></input>
                                            </Poptip>
                                        </span>
                    <div>
                      <div v-for="fileItem in imgs" :key='fileItem.id' v-if="fileItem.field == child.itemId">
                        <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                          <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                        </router-link>
                        <a @click="downloadFiles(fileItem)"><span
                            style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                        </a>
                      </div>
                    </div>
                  </Col>
                </Row>
              </div>
              <div class="modelSub" v-if="item.modelSubName.indexOf('风险分析')!=-1">
                <Row :class="rowIndex%2==0?detailRow1:detailRow2" v-for="(row,rowIndex) in item.rows" :key="row.itemId">
                  <Col span="6" v-for="child in row" :key="child.itemId"
                       style="padding-left: 10px;border-right: 1px solid #E0E0EC;">
                    <span v-if="child.itemId!=undefined && child.dataType=='3'" style="float:left;color:red">*</span>
                    <CheckboxGroup disabled v-model="child.instanceContent"
                                   v-if="child.itemId!=undefined && child.dataType!='2'">
                      <Checkbox disabled label="1">
                        <span>{{ child.itemName }}</span>
                      </Checkbox>
                    </CheckboxGroup>
                    <span v-if="child.itemId!=undefined && child.dataType=='2'">{{ child.itemName }}<br>
                                            <Poptip trigger="hover" title="" placement="left">
                                                <div slot="content">
                                                    <p style="white-space: normal">{{ child.instanceContent }}</p>
                                                </div>
                                                <input readonly type="text" style="height: 35px"
                                                       v-model="child.instanceContent"
                                                       @change="getChildPosition(index,child.itemId,child.instanceContent)"></input>
                                            </Poptip>
                                        </span>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType!=undefined&&modelData.modelType!=''
                            &&modelData.modelType!='ptw-100001000000020'&&modelData.modelType!='ptw-100001000000021'
                            &&modelData.modelType!='ptw-100001000000023'
                            &&modelData.modelType!='ptw-100001000000024'&&modelData.modelType!='ptw-100001000000025'">
              <p slot="title">现场确认</p>
              <div>
                <Form :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <p>本人已清楚本次作业的风险和控制措施，将严格遵守相关要求并确认所有安全措施已落实到位。</p>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="作业人员确认签字：" prop="workPeopleSign">
                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('workPeopleSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="监护人确认签字：" prop="siteGuarderSign">
                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('siteGuarderSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="作业负责人确认签字：" prop="workChargeSign">
                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('workChargeSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="附件：" prop="workChargeSign">
                        <div v-for="fileItem in signPhotoFileList" :key='fileItem.id'>
                          <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                          </router-link>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000025'">
              <p slot="title">现场确认</p>
              <div>
                <Form :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <p>本人已清楚本次作业的风险和控制措施，将严格遵守相关要求并确认所有安全措施已落实到位。</p>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="实施安全教育人：" prop="workPeopleSign">
                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('workPeopleSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="附件：" prop="workPeopleSign">
                        <div v-for="fileItem in signPhotoFileList" :key='fileItem.id'>
                          <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                          </router-link>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000020' || modelData.modelType=='ptw-100001000000021'">
              <p slot="title">现场确认</p>
              <div>
                <Form :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <p>本人已清楚本次作业的风险和控制措施，将严格遵守相关要求并确认所有安全措施已落实到位。</p>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="爆破班组长签字：" prop="chargePeopleSign">
                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('chargePeopleSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="爆破安全员签字：" prop="securityGuardSign">
                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('securityGuardSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="爆破技术员签字：" prop="technicianSign">
                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('technicianSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="作业负责人确认签字：" prop="workChargeSign">
                        <div v-for="fileItem in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('workChargeSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="附件：" prop="workChargeSign">
                        <div v-for="fileItem in signPhotoFileList" :key='fileItem.id'>
                          <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                          </router-link>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000005'"> <!--动火-->
              <p slot="title">气体浓度检测分析记录</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="donghuoGasColumn" :data="beforeGasDatas">
                      <template slot-scope="{ row, index }" slot="checkResult">
                        <RadioGroup v-model="beforeGasDatas[index].checkResult">
                          <Radio disabled label="1">符合</Radio>
                          <Radio disabled label="2">不符合</Radio>
                        </RadioGroup>
                      </template>
                      <template slot-scope="{ row,index }" slot="checkUserSign">
                        <div style="display:flex;flex-direction:column;justify-content:center"
                             @click="currentGasDataIndex = index">
                          <div style="display:flex;flex-direction:column;justify-content:center"
                               v-if="beforeGasDatas[index].file != null && beforeGasDatas[index].file != undefined">
                            <router-link target="_blank"
                                         :to="{path:'/imgDetails',query:{id: beforeGasDatas[index].file.id}}">
                              <img :src=" beforeGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles( beforeGasDatas[index].file)"><span
                                style="color: #3399ff;margin-left: 5px"> {{
                                beforeGasDatas[index].file.fileName
                              }}</span>
                            </a>
                          </div>
                        </div>
                      </template>
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000007'"> <!--篦冷机清大块-->
              <p slot="title">气体浓度检测分析记录</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Button style="margin-top:20px" class="ivu-btn-add" icon="md-add" @click="addGas()">新增</Button>
                  </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="lengjiGasColumn" :data="beforeGasDatas">
                      <template slot-scope="{ row, index }" slot="checkResult">
                        <RadioGroup v-model="beforeGasDatas[index].checkResult">
                          <Radio disabled label="1">符合</Radio>
                          <Radio disabled label="2">不符合</Radio>
                        </RadioGroup>
                      </template>
                      <template slot-scope="{ row,index }" slot="checkUserSign">
                        <div style="display:flex;flex-direction:column;justify-content:center"
                             @click="currentGasDataIndex = index">
                          <div style="display:flex;flex-direction:column;justify-content:center"
                               v-if="beforeGasDatas[index].file != null && beforeGasDatas[index].file != undefined">
                            <router-link target="_blank"
                                         :to="{path:'/imgDetails',query:{id: beforeGasDatas[index].file.id}}">
                              <img :src=" beforeGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles( beforeGasDatas[index].file)"><span
                                style="color: #3399ff;margin-left: 5px"> {{
                                beforeGasDatas[index].file.fileName
                              }}</span>
                            </a>
                          </div>
                        </div>
                      </template>
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000002' || modelData.modelType=='ptw-100001000000003'">
              <!--有限空间-->
              <p slot="title">气体浓度检测分析记录</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="youxianGasColumn" :data="beforeGasDatas">
                      <template slot-scope="{ row, index }" slot="checkResult">
                        <RadioGroup v-model="beforeGasDatas[index].checkResult">
                          <Radio disabled label="1">符合</Radio>
                          <Radio disabled label="2">不符合</Radio>
                        </RadioGroup>
                      </template>
                      <template slot-scope="{ row,index }" slot="checkUserSign">
                        <div style="display:flex;flex-direction:column;justify-content:center"
                             @click="currentGasDataIndex = index">
                          <div style="display:flex;flex-direction:column;justify-content:center"
                               v-if="beforeGasDatas[index].file != null && beforeGasDatas[index].file != undefined">
                            <router-link target="_blank"
                                         :to="{path:'/imgDetails',query:{id: beforeGasDatas[index].file.id}}">
                              <img :src=" beforeGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles( beforeGasDatas[index].file)"><span
                                style="color: #3399ff;margin-left: 5px"> {{
                                beforeGasDatas[index].file.fileName
                              }}</span>
                            </a>
                          </div>
                        </div>
                      </template>
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card v-if="modelData.modelType!=undefined&&modelData.modelType!=''
                                &&modelData.modelType!='ptw-100001000000023' &&modelData.modelType!='ptw-100001000000024'
                               &&modelData.modelType!='ptw-100001000000025'" shadow>
              <p slot="title">现场应急处置</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <p>{{ modelData.notes }}</p>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                      <FormItem label="逃生路径：" prop="escapePath">
                        {{ ptwData.escapePath }}
                      </FormItem>
                    </Col>
                    <Col span="11">
                      <FormItem label="其他应急处置：" prop="emergencyHandling">
                        {{ ptwData.emergencyHandling }}
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                      <!-- 18000050 混凝土 -->
                      <FormItem
                          :label="this.ptwPlanData.twoLevelOrgId=='18000050'?'站点业务主管部门负责人：':'属地部门安全员：'"
                          prop="belongOrgOfficerName">
                        {{ ptwData.belongOrgOfficerName }}
                      </FormItem>
                    </Col>
                    <Col span="11">
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <div v-if="!taskInfo.viewFlag">
              <Divider orientation="left">操作信息</Divider>
              <Row :gutter="16">
                <Col span="8">
                  <FormItem label="审批意见：" prop="route">
                    <Select v-model="showdata.route" @on-change="changeResult">
                      <Option v-for="item in approveList" :value="item.value" :label="item.text" :key="item.value">
                        {{ item.text }}
                      </Option>
                    </Select>
                  </FormItem>
                </Col>
                <Col span="8" v-if="isBelongOrgLeader && showdata.route != 2">
                  <FormItem :label="currentTaskName" prop="belongOrgLeaderName">
                    <Input type="text" v-model="showdata.belongOrgLeaderName"
                           @on-focus="choosePeople('belongOrgLeader')"></Input>
                  </FormItem>
                </Col>
                <Col span="8" v-if="isBussinessDept && showdata.route != 2">
                  <FormItem :label="currentTaskName" prop="bussinessDeptName">
                    <Input type="text" v-model="showdata.bussinessDeptName"
                           @on-focus="choosePeople('bussinessDept')"></Input>
                  </FormItem>
                </Col>
                <Col span="8" v-if="isSecurityDept && showdata.route != 2">
                  <FormItem :label="currentTaskName" prop="securityDeptName">
                    <Input type="text" v-model="showdata.securityDeptName"
                           @on-focus="choosePeople('securityDept')"></Input>
                  </FormItem>
                </Col>
                <Col span="8" v-if="isSecurityDirect && showdata.route != 2">
                  <FormItem :label="currentTaskName" prop="securityDirectName">
                    <Input type="text" v-model="showdata.securityDirectName"
                           @on-focus="choosePeople('securityDirect')"></Input>
                  </FormItem>
                </Col>
                <Col span="8" v-if="isChargeLeader && showdata.route != 2">
                  <FormItem :label="currentTaskName" prop="chargeLeaderName">
                    <Input type="text" v-model="ptwData.chargeLeaderName"
                           @on-focus="choosePeople('chargeLeader')"></Input>
                  </FormItem>
                </Col>
                <Col span="8" v-if="isDeptPrincipal && showdata.route != 2">
                  <FormItem :label="currentTaskName" prop="deptPrincipalName">
                    <Input type="text" v-model="ptwData.deptPrincipalName"
                           @on-focus="choosePeople('deptPrincipal')"></Input>
                  </FormItem>
                </Col>
              </Row>
              <Row :gutter="16" v-if="taskName != '上报人' && showdata.route != 2 ">
                <Col span="16">
                  <FormItem label="签名：" prop="sign">
                    <Upload
                        action=""
                        multiple
                        :before-upload="beforeUploadSign"
                        ref="upload"
                        type="drag"
                        name="files"
                        :format="['jpg','jpeg','png']">
                      <div style="padding: 5px 0">
                        <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                        <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                      </div>
                    </Upload>
                    <div v-for="fileItem in nodeSignFileList" :key='fileItem.id'>
                      <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                        <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                      </router-link>
                      <a @click="downloadFiles(fileItem)"><span
                          style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                      </a>
                      <a @click="nodeSignFileRemove(fileItem.id)"><span
                          style="color: #3399ff;margin-left: 5px">删除</span>
                      </a>
                    </div>
                  </FormItem>
                </Col>
              </Row>
              <Row :gutter="16">
                <Col span="20">
                  <FormItem label="处理意见：" prop="opinion">
                    <Input v-model="showdata.opinion" type="textarea" :rows="2"/>
                  </FormItem>
                </Col>
              </Row>
            </div>
          </Form>
          <div v-if="taskName == '上报人'">
            <Card shadow>
              <p slot="title">作业票信息</p>
              <div>
                <Form ref="ptwPlanData" :model="ptwPlanData" :rules="ruleCustom" :label-width="180"
                      v-if="taskName == '上报人'">
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="任务名称：" prop="planName">
                        {{ ptwPlanData.planName }}
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                      <FormItem label="任务单位类型：" prop="orgType">
                        <RadioGroup disabled v-model="ptwPlanData.orgType" @on-change="changeType">
                          <Radio disabled label="0">内部单位</Radio>
                          <Radio disabled label="1">相关方</Radio>
                        </RadioGroup>
                      </FormItem>
                    </Col>
                    <Col span="11">
                      <FormItem label="作业时间：" prop="workDate">
                        {{ formatDate(new Date(ptwPlanData.workDate), 'yyyy-MM-dd') }}
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                      <FormItem label="所属单位：" prop="belongOrgId">
                        {{ ptwPlanData.belongOrgName }}
                      </FormItem>
                    </Col>
                    <Col span="11">
                      <FormItem label="作业单位：" prop="operateOrgId">
                        {{ ptwPlanData.operateOrgName }}
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="作业描述：" prop="workDesc">
                        {{ ptwPlanData.workDesc }}
                      </FormItem>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000001'">  <!-- 吊装-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="汽车吊（t）：" prop="craneQuality">
                            <InputNumber :min="1" style="width:100%" v-model="ptwData.craneQuality"></InputNumber>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="吊装质量（t）：" prop="hoistingQuality">
                            <InputNumber :min="1" style="width:100%" v-model="ptwData.hoistingQuality"></InputNumber>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="吊装高度（m）：" prop="hoistingHeight">
                            <InputNumber :min="1" style="width:100%" v-model="ptwData.hoistingHeight"></InputNumber>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <Poptip trigger="hover" title="" placement="left">
                              <RadioGroup v-model="ptwData.workGrade">
                                <Radio v-for="(item,index) in workGrades" :label="item.codingCodeId"
                                       :key="item.codingCodeId">{{ item.codingName }}
                                </Radio>
                              </RadioGroup>
                              <div slot="content">
                                <p>一级吊装：汽车吊＞100t或吊装质量＞40t或吊装高度＞60m</p>
                                <p>二级吊装：汽车吊50t— 100t或吊装质量10t—40t或吊装高度20—60m</p>
                                <p>三级吊装：汽车吊＜50t或吊装质量＜10t或吊装高度＜20m</p>
                              </div>
                            </Poptip>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            <Input type="text" v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="司索人员：" prop="cablePeople">
                            <Input type="text" v-model="ptwData.cablePeople"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="起重指挥：" prop="craneDirect">
                            <Input type="text" v-model="ptwData.craneDirect"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场指挥：" prop="siteDirect">
                            <Input type="text" v-model="ptwData.siteDirect"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="起重司机：" prop="craneDriver">
                            <Input type="text" v-model="ptwData.craneDriver"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000002'">  <!-- 清库清仓-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="text" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员及证号：" prop="workPeople">
                            <Input type="text" v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000006' || modelData.modelType=='ptw-100001000000007'  ">
              <!--清库清仓作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                      </Row>

                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            <Input type="text" v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000003'"> <!--有限空间-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <Poptip trigger="hover" title="" placement="left">
                              <RadioGroup v-model="ptwData.workGrade">
                                <Radio v-for="(item,index) in confinedSpaceWorkGrades" :label="item.codingCodeId"
                                       :key="item.codingCodeId">{{ item.codingName }}
                                </Radio>
                              </RadioGroup>
                              <div slot="content">
                                <p>特级：封闭式污水处理池、封闭式氨水回收池、封闭式危废储存池或储罐等检维修</p>
                                <p> 作业（各类储库清理执行清库作业要求）。</p>
                                <p>一级：关联、上下游设备及自身在运行状态下的立式磨、球磨机、选粉机、蒸压釜、</p>
                                <p> 烘干机、回转窑、篦冷机、增湿塔、热风炉、分离器、压力容器、锅炉、电袋除尘器、</p>
                                <p> 分解炉、预热器及管道、危废处置地坑；危废贮存容器、氨水罐、半封闭污水处理池、</p>
                                <p> 封闭式油池等检维修作业。</p>
                                <p>二级：关联、上下游设备及自身在检修状态下的立式磨、球磨机、选粉机、蒸压釜、烘干机、</p>
                                <p> 回转窑、篦冷机、增湿塔、热风炉、分离器、压力容器、锅炉、电袋除尘器、分解炉、</p>
                                <p> 预热器及管道、烟室、旋风筒、风管、下料管、危废贮存容器、危废处置地坑、商砼搅拌机、</p>
                                <p> 窨井、半封闭式蓄水池、矿山封闭式溜槽、常压罐车、半封闭式容器、半封闭电缆隧道、</p>
                                <p> 半封闭式蓄水池、半封闭式地下坑道等检维修作业。</p>
                              </div>
                            </Poptip>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            <Input type="text" v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000004'"> <!--高处作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="基准面（m）：" prop="datumGrade">
                            <Input type="text" v-model="ptwData.datumGrade"/>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <Poptip trigger="hover" title="" placement="left">
                              <RadioGroup v-model="ptwData.workGrade">
                                <Radio v-for="(item,index) in highWorkGrades" :label="item.codingCodeId"
                                       :key="item.codingCodeId">{{ item.codingName }}
                                </Radio>
                              </RadioGroup>
                              <div slot="content">
                                <p>特级高处作业：基准面30米以上</p>
                                <p>三级高处作业：基准面15—30米</p>
                                <p>二级高处作业：基准面5—15米</p>
                                <p>一级高处作业：基准面2—5米</p>
                              </div>
                            </Poptip>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业人员及证号：" prop="workPeople">
                            <Input type="text" v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000005'"> <!--动火作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <Poptip trigger="hover" title="" placement="left">
                              <RadioGroup v-model="ptwData.workGrade">
                                <Radio label="ptw-100003000000001">特殊动火</Radio>
                                <Radio label="ptw-100003000000002">一级动火</Radio>
                                <Radio label="ptw-100003000000003">二级动火</Radio>
                              </RadioGroup>
                              <div slot="content">
                                <p>特殊动火作业：处于运行状态的易燃、易爆场所内的动火作业。包括柴油库、输油管道、</p>
                                <p> 氧气乙炔气瓶库、煤磨、煤粉输送管道、危废贮存场所、危废处置场所、</p>
                                <p> 总降变电站、高低压电气室、压力管道、锅炉、压力容器等。</p>
                                <p>一级动火作业：处于检修状态的易燃、易爆场所内的动火作业。包括检修状态的煤磨、</p>
                                <p> 煤粉输送管道、煤粉仓、煤磨袋除尘器、氨水罐区、锅炉、压力容器、
                                <p> 危废贮存场所、危废处置场所、总降变电站、高低压电气室、原煤堆场等。 </p>
                                <p>二级动火作业：停车检修，经清洗置换并采取安全隔离措施后，火灾、爆炸危险性比较小的</p>
                                <p> 场所内动火作业。包括：氨水储存区半径25 m范围内、稀油站、纸袋仓库、</p>
                                <p> 空压机站、原煤输送设备、食堂操作间、宿舍楼、档案室、汽车库、停车棚等</p>
                                <p> 存在一定火灾风险的其他场所。</p>
                              </div>
                            </Poptip>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员及证号：" prop="workPeople">
                            <Input type="text" v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000008'"> <!--临时用电作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请用电地点：" prop="applyUseElectricSite">
                            <Input type="text" v-model="ptwData.applyUseElectricSite"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="用电功率：" prop="useElectricPower">
                            <Input type="text" v-model="ptwData.useElectricPower"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请供电制式：" prop="electricStandard">
                            <RadioGroup v-model="ptwData.electricStandard">
                              <Radio label="1">单相</Radio>
                              <Radio label="2">三相四线</Radio>
                              <Radio label="3">三相五线</Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="电源接入点：" prop="electricAccessPoint">
                            <Input type="textarea" v-model="ptwData.electricAccessPoint"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="计划用电天数：" prop="applyUseElectricDay">
                            <InputNumber :min="1" style="width:100%"
                                         v-model="ptwData.applyUseElectricDay"></InputNumber>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="操作类型：" prop="electricType">
                            <RadioGroup v-model="ptwData.electricType">
                              <Radio label="1">安装</Radio>
                              <Radio label="2">拆除</Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="操作时间：" prop="electricWorkTime">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.electricWorkTime"
                                        placement="bottom-end"
                                        placeholder="选择操作时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="验收时间：" prop="electricCheckTime">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.electricCheckTime"
                                        placement="bottom-end"
                                        placeholder="选择验收时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请用电开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        placeholder="选择开始时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请用电结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择结束时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                      <FormItem label="电工签名：" prop="eleWorkerName">
                        <Upload
                            multiple
                            action=""
                            :before-upload="beforeUploadEleWorkerNameSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('eleWorkerNameSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                    <Col span="11">
                      <FormItem label="验收人签名：" prop="eleCheckerName">
                        <Upload
                            multiple
                            action=""
                            :before-upload="beforeUploadEleCheckerNameSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('eleCheckerNameSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000009'"> <!--高温作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <RadioGroup v-model="ptwData.workGrade">
                              <Radio label="item.codingCodeId" :key="item.codingCodeId">{{ item.codingName }}</Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业人员及证号：" prop="workPeople">
                            <Input type="text" v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000010'"> <!--交叉作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000010'"> <!--交叉-->
              <p slot="title">相关方列表</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Button style="margin-top:20px" class="ivu-btn-add" icon="md-add" @click="addRelatedParty()">新增
                    </Button>
                  </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="relatedPartyColumn" :data="relatedPartyDatas">
                      <template slot-scope="{ row, index }" slot="relatedPartyName">
                        <Input type="textarea" :autosize="{minRows:2,maxRows:5}"
                               v-model="relatedPartyDatas[index].relatedPartyName"/>
                      </template>
                      <template slot-scope="{ row, index }" slot="contactPerson">
                        <Input type="textarea" :autosize="{minRows:2,maxRows:5}"
                               v-model="relatedPartyDatas[index].contactPerson"/>
                      </template>
                      <template slot-scope="{ row, index }" slot="contactPhone">
                        <Input type="textarea" style="width:100%" v-model="relatedPartyDatas[index].contactPhone"/>
                      </template>
                      <template slot-scope="{ row, index }" slot="actions">
                        <Button :autosize="{minRows:2,maxRows:5}" @click="deleteRelatedParty(index)">删除</Button>
                      </template>
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000011'"> <!--动土作业许可-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业内容：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业等级：" prop="workGrade">
                            <Poptip trigger="hover" title="" placement="left">
                              <RadioGroup v-model="ptwData.workGrade">
                                <Radio v-for="(item,index) in soilWorkGrades" :label="item.codingCodeId"
                                       :key="item.codingCodeId">{{ item.codingName }}
                                </Radio>
                              </RadioGroup>
                              <div slot="content">
                                <p>交通次干道动土作业</p>
                                <p>交通主干道动土作业</p>
                              </div>
                            </Poptip>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyStartDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择开始时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyEndDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        placement="bottom-end"
                                        @on-change="changeDate" placeholder="选择结束时间"
                                        style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000020' || modelData.modelType=='ptw-100001000000021'">
              <!-- 爆破作业，盲炮处理-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业类型：" prop="workType">
                            <RadioGroup v-model="ptwData.workType">
                              <Radio v-for="(item,index) in workTypes" :label="item.codingCodeId"
                                     :key="item.codingCodeId">{{ item.codingName }}
                              </Radio>
                            </RadioGroup>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择开始时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择结束时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000022'">  <!-- 大型铸件合浇作业-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="主管部门(申请部门)：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="主管部门协调员：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业部门/单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="属地管理部门：" prop="colonyDept">
                            <Input type="text" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业项目简述：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人员：" prop="workPeople">
                            <Input v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业负责人：" prop="workCharge">
                            <Input type="text" v-model="ptwData.workCharge"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="现场监护人：" prop="siteGuarder">
                            <Input type="text" v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择开始时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择结束时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000025'">  <!-- 断路作业-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请单位：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请人：" prop="adminDeptExpediter">
                            <Input type="text" v-model="ptwData.adminDeptExpediter"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业编号：" prop="workPeople">
                            <Input type="text" v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="涉及相关单位（部门）：" prop="colonyDept">
                            <Input type="textarea" v-model="ptwData.colonyDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="断路原因：" prop="brokenReason">
                            <Input type="textarea" v-model="ptwData.brokenReason"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="断路开始时间：" prop="applyWorkDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择开始时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="断路结束时间：" prop="applyWorkDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择结束时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="断路地段示意图及相关说明：" prop="brokenExplain">
                            <Input v-model="ptwData.brokenExplain"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="附件：" prop="file">
                            <Upload
                                action=""
                                multiple
                                :before-upload="beforeUploadBrokenExplainPhoto"
                                ref="upload"
                                type="drag"
                                name="files"
                                :format="['jpg','jpeg','png']">
                              <div style="padding: 5px 0">
                                <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                                <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                              </div>
                            </Upload>
                            <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                              <div v-if="fileItem.fileName.indexOf('file')!=-1">
                                <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                                  <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                                </router-link>
                                <a @click="downloadFiles(fileItem)"><span
                                    style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                                </a>
                                <a @click="signFileRemove(index,fileItem.id)"><span
                                    style="color: #3399ff;margin-left: 5px">删除</span>
                                </a>
                              </div>
                            </div>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="危害辨识：" prop="hazardIdentification">
                            <Input type="text" v-model="ptwData.hazardIdentification"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000024' || modelData.modelType=='ptw-100001000000023'">
              <!-- 清结皮作业-->
              <p slot="title">基础信息</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="160" label-position="right">
                  <Row>
                    <Col span="24">
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="管理单位：" prop="adminDept">
                            <Input type="text" v-model="ptwData.adminDept"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业单位：" prop="workDept">
                            <Input type="text" v-model="ptwData.workDept"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业地点：" prop="workSite">
                            <Input type="text" v-model="ptwData.workSite"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="作业高度：" v-if="modelData.modelType=='ptw-100001000000024'"
                                    prop="workHeight">
                            <Input type="text" v-model="ptwData.workHeight"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="23">
                          <FormItem label="作业内容：" prop="projectDesc">
                            <Input type="textarea" v-model="ptwData.projectDesc"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="作业人：" prop="workPeople">
                            <Input v-model="ptwData.workPeople"></Input>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="监护人：" prop="siteGuarder">
                            <Input v-model="ptwData.siteGuarder"></Input>
                          </FormItem>
                        </Col>
                      </Row>
                      <Row type="flex" justify="space-around" class="code-row-bg">
                        <Col span="11">
                          <FormItem label="申请作业开始时间：" prop="applyWorkDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyStartDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择开始时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                        <Col span="11">
                          <FormItem label="申请作业结束时间：" prop="applyWorkDate">
                            <DatePicker type="datetime" format="yyyy-MM-dd HH:mm" v-model="ptwData.applyEndDate"
                                        @on-change="changeDate" placement="bottom-end"
                                        placeholder="选择结束时间" style="width: 100%"></DatePicker>
                          </FormItem>
                        </Col>
                      </Row>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000024' || modelData.modelType=='ptw-100001000000023'">
              <!--交叉-->
              <p slot="title">特种作业人员列表</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Button style="margin-top:20px" class="ivu-btn-add" icon="md-add" @click="addPtwWorker()">新增
                    </Button>
                  </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="ptwWorkerColumn" :data="ptwWorkerDatas">
                      <template slot-scope="{ row, index }" slot="userName">
                        <Input type="text" v-model="ptwWorkerDatas[index].userName"/>
                      </template>
                      <template slot-scope="{ row, index }" slot="userType">
                        <Select v-model="ptwWorkerDatas[index].userType" transfer="true" style="width:120px">
                          <Option value="1">高处作业</Option>
                          <Option value="2">焊工作业</Option>
                          <Option value="3">起重作业</Option>
                          <Option value="4">电工作业</Option>
                        </Select>
                      </template>
                      <template slot-scope="{ row, index }" slot="userNumber">
                        <Input type="text" v-model="ptwWorkerDatas[index].userNumber"/>
                      </template>
                      <template slot-scope="{ row, index }" slot="actions">
                        <Button @click="deletePtwWorker(index)">删除</Button>
                      </template>
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card bordered dis-hover :key="item.modelSubId" v-for="(item,index) in workItems" shadow>
              <p slot="title">
                {{ item.parentModelSubName != null ? item.parentModelSubName + "-" : "" }}{{ item.modelSubName }}：{{ item.modelSubDesc }}
              </p>
              <div class="modelSub" v-if="item.modelSubName.indexOf('控制措施')!=-1">
                <Row :class="rowIndex%2==0?detailRow1:detailRow2" v-for="(row,rowIndex) in item.rows" :key="row.itemId">
                  <Col span="6" v-for="(child,childIndex) in row" :key="child.itemId"
                       style="padding-left: 10px;border-right: 1px solid #E0E0EC;">
                    <span v-if="child.itemId!=undefined && child.dataType=='3'" style="color:red">*</span>
                    <span v-if="child.itemId!=undefined && child.dataType!='2'">{{ child.itemName }}<br>
                                            <RadioGroup v-model="child.instanceContent">
                                                <Radio label="1">是</Radio>
                                                <Radio label="0">否</Radio>
                                            </RadioGroup>
                                        </span>
                    <span v-if="child.itemId!=undefined && child.dataType=='2'">{{ child.itemName }}<br>
                                            <Poptip trigger="hover" title="" placement="left">
                                                <div slot="content">
                                                    <p style="white-space: normal">{{ child.instanceContent }}</p>
                                                </div>
                                                <input type="text" readonly style="height: 35px"
                                                       v-model="child.instanceContent"
                                                       @change="getChildPosition(index,child.itemId,child.instanceContent)"></input>
                                            </Poptip>
                                        </span>
                    <div v-if="child.fileList != undefined && child.fileList.length > 0">
                      <div v-for="(fileItem,fileItemIndex) in child.fileList" :key='fileItem.id'>
                        <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                          <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                        </router-link>
                        <a @click="downloadFiles(fileItem)"><span
                            style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                        </a>
                        <a @click="controlRemove(rowIndex,childIndex,fileItemIndex,fileItem.id)"><span
                            style="color: #3399ff;margin-left: 5px">删除</span>
                        </a>
                      </div>
                    </div>
                  </Col>
                </Row>
              </div>
              <div class="modelSub" v-if="item.modelSubName.indexOf('风险分析')!=-1">
                <Row :class="rowIndex%2==0?detailRow1:detailRow2" v-for="(row,rowIndex) in item.rows" :key="row.itemId">
                  <Col span="6" v-for="child in row" :key="child.itemId"
                       style="padding-left: 10px;border-right: 1px solid #E0E0EC;">
                    <span v-if="child.itemId!=undefined && child.dataType=='3'" style="float:left;color:red">*</span>
                    <CheckboxGroup v-model="child.instanceContent"
                                   v-if="child.itemId!=undefined && child.dataType!='2'">
                      <Checkbox label="1">
                        <span>{{ child.itemName }}</span>
                      </Checkbox>
                    </CheckboxGroup>
                    <span v-if="child.itemId!=undefined && child.dataType=='2'">{{ child.itemName }}<br>
                                            <Poptip trigger="hover" title="" placement="left">
                                                <div slot="content">
                                                    <p style="white-space: normal">{{ child.instanceContent }}</p>
                                                </div>
                                                <input type="text" readonly style="height: 35px"
                                                       v-model="child.instanceContent"
                                                       @change="getChildPosition(index,child.itemId,child.instanceContent)"></input>
                                            </Poptip>
                                        </span>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType!=undefined&&modelData.modelType!=''
                            &&modelData.modelType!='ptw-100001000000020'&&modelData.modelType!='ptw-100001000000021'
                            &&modelData.modelType!='ptw-100001000000023'
                            &&modelData.modelType!='ptw-100001000000024'&&modelData.modelType!='ptw-100001000000025'">
              <div>
                <p slot="title">现场确认</p>
                <Form :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <p>本人已清楚本次作业的风险和控制措施，将严格遵守相关要求并确认所有安全措施已落实到位。</p>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="作业人员确认签字：" prop="workPeopleSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadWorkPeopleSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('workPeopleSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="监护人确认签字：" prop="siteGuarderSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadSiteGuarderSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('siteGuarderSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="作业负责人确认签字：" prop="workChargeSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadWorkChargeSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('workChargeSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="附件：" prop="workPeopleSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadConfirmPhoto"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signPhotoFileList" :key='fileItem.id'>
                          <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                          </router-link>
                          <a @click="downloadFiles(fileItem)"><span
                              style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                          </a>
                          <a @click="signPhotoRemove(index,fileItem.id)"><span
                              style="color: #3399ff;margin-left: 5px">删除</span>
                          </a>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000025'">
              <p slot="title">现场确认</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <p>本人已清楚本次作业的风险和控制措施，将严格遵守相关要求并确认所有安全措施已落实到位。</p>
                  </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <FormItem label="实施安全教育人：" prop="workPeopleSign">
                      <Upload
                          multiple
                          action=""
                          :before-upload="beforeUploadWorkPeopleSign"
                          ref="upload"
                          type="drag"
                          name="files"
                          :format="['jpg','jpeg','png']"
                      >
                        <div style="padding: 5px 0">
                          <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                          <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                        </div>
                      </Upload>
                      <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                        <div v-if="fileItem.fileName.indexOf('workPeopleSign')!=-1">
                          <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                          </router-link>
                          <a @click="downloadFiles(fileItem)"><span
                              style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                          </a>
                          <a @click="signFileRemove(index,fileItem.id)"><span
                              style="color: #3399ff;margin-left: 5px">删除</span>
                          </a>
                        </div>
                      </div>
                    </FormItem>
                  </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <FormItem label="附件：" prop="workPeopleSign">
                      <Upload
                          action=""
                          multiple
                          :before-upload="beforeUploadConfirmPhoto"
                          ref="upload"
                          type="drag"
                          name="files"
                          :format="['jpg','jpeg','png']">
                        <div style="padding: 5px 0">
                          <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                          <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                        </div>
                      </Upload>
                      <div v-for="(fileItem,index) in signPhotoFileList" :key='fileItem.id'>
                        <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                          <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                        </router-link>
                        <a @click="downloadFiles(fileItem)"><span
                            style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                        </a>
                        <a @click="signPhotoRemove(index,fileItem.id)"><span
                            style="color: #3399ff;margin-left: 5px">删除</span>
                        </a>
                      </div>
                    </FormItem>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow
                  v-if="modelData.modelType=='ptw-100001000000020' || modelData.modelType=='ptw-100001000000021'">
              <p slot="title">现场确认</p>
              <div>
                <Form :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="爆破班组长签字：" prop="chargePeopleSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadChargePeopleSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']"
                        >
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('chargePeopleSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="爆破安全员签字：" prop="securityGuardSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadSecurityGuardSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']"
                        >
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('securityGuardSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="爆破技术员签字：" prop="technicianSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadTechnicianSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('technicianSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="作业负责人确认签字：" prop="workChargeSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadWorkChargeSign"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signFileList" :key='fileItem.id'>
                          <div v-if="fileItem.fileName.indexOf('workChargeSign')!=-1">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                              <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles(fileItem)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                            </a>
                            <a @click="signFileRemove(index,fileItem.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <FormItem label="附件：" prop="workPeopleSign">
                        <Upload
                            action=""
                            multiple
                            :before-upload="beforeUploadConfirmPhoto"
                            ref="upload"
                            type="drag"
                            name="files"
                            :format="['jpg','jpeg','png']">
                          <div style="padding: 5px 0">
                            <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                            <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                          </div>
                        </Upload>
                        <div v-for="(fileItem,index) in signPhotoFileList" :key='fileItem.id'>
                          <router-link target="_blank" :to="{path:'/imgDetails',query:{id:fileItem.id}}">
                            <img :src="fileItem.allPath" alt="" style="width: 50px;height: 50px;">
                          </router-link>
                          <a @click="downloadFiles(fileItem)"><span
                              style="color: #3399ff;margin-left: 5px"> {{ fileItem.fileName }}</span>
                          </a>
                          <a @click="signPhotoRemove(index,fileItem.id)"><span
                              style="color: #3399ff;margin-left: 5px">删除</span>
                          </a>
                        </div>
                      </FormItem>
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000005'"> <!--动火-->
              <p slot="title">气体浓度检测分析记录</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Button style="margin-top:20px" class="ivu-btn-add" icon="md-add" @click="addGas()">新增</Button>
                  </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="donghuoGasColumn" :data="beforeGasDatas">
                      <template slot-scope="{ row, index }" slot="checkResult">
                        <RadioGroup v-model="beforeGasDatas[index].checkResult">
                          <Radio disabled label="1">符合</Radio>
                          <Radio disabled label="2">不符合</Radio>
                        </RadioGroup>
                      </template>
                      <template slot-scope="{ row,index }" slot="checkUserSign">
                        <div onclick="currentGasDataIndex = index">
                          <Upload
                              action=""
                              multiple
                              :before-upload="beforeUploadFile"
                              ref="upload"
                              type="drag"
                              name="files"
                              :format="['jpg','jpeg','png']">
                            <div style="padding: 5px 0">
                              <Icon type="ios-cloud-upload" size="20" style="color: #F27874"></Icon>
                              <p><span style="color: red">*</span>&nbsp;请上传图片</p>
                            </div>
                          </Upload>
                          <div v-if=" row.file != undefined">
                            <router-link target="_blank" :to="{path:'/imgDetails',query:{id: row.file.id}}">
                              <img :src=" row.file.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles( row.file)"><span
                                style="color: #3399ff;margin-left: 5px"> {{ row.file.fileName }}</span>
                            </a>
                            <a @click="beforeGasRemove(index, row.file.id)"><span
                                style="color: #3399ff;margin-left: 5px">删除</span>
                            </a>
                          </div>
                        </div>
                      </template>
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType=='ptw-100001000000003'"> <!--有限空间-->
              <p slot="title">气体浓度检测分析记录</p>
              <div>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Button style="margin-top:20px" class="ivu-btn-add" icon="md-add" @click="addGas()">新增</Button>
                  </Col>
                </Row>
                <Row type="flex" justify="space-around" class="code-row-bg">
                  <Col span="23">
                    <Table class="tableClass" highlight-row stripe border
                           style="overflow-y:auto;"
                           :height="200" :columns="youxianGasColumn" :data="beforeGasDatas">
                      <template slot-scope="{ row, index }" slot="checkResult">
                        <RadioGroup v-model="beforeGasDatas[index].checkResult">
                          <Radio disabled label="1">符合</Radio>
                          <Radio disabled label="2">不符合</Radio>
                        </RadioGroup>
                      </template>
                      <template slot-scope="{ row,index }" slot="checkUserSign">
                        <div style="display:flex;flex-direction:column;justify-content:center"
                             @click="currentGasDataIndex = index">
                          <div style="display:flex;flex-direction:column;justify-content:center"
                               v-if="beforeGasDatas[index].file != null && beforeGasDatas[index].file != undefined">
                            <router-link target="_blank"
                                         :to="{path:'/imgDetails',query:{id: beforeGasDatas[index].file.id}}">
                              <img :src=" beforeGasDatas[index].file.allPath" alt="" style="width: 50px;height: 50px;">
                            </router-link>
                            <a @click="downloadFiles( beforeGasDatas[index].file)"><span
                                style="color: #3399ff;margin-left: 5px"> {{
                                beforeGasDatas[index].file.fileName
                              }}</span>
                            </a>
                          </div>
                        </div>
                      </template>
                    </Table>
                  </Col>
                </Row>
              </div>
            </Card>
            <Card shadow v-if="modelData.modelType!=undefined&&modelData.modelType!=''&&modelData.modelType!='ptw-100001000000023'
                                      &&modelData.modelType!='ptw-100001000000024'&&modelData.modelType!='ptw-100001000000025'">
              <p slot="title">现场应急处置</p>
              <div>
                <Form ref="ptwData" :model="ptwData" :rules="ptwRuleCustom" :label-width="180" label-position="right">
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="23">
                      <p>{{ modelData.notes }}</p>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                      <FormItem label="逃生路径：" prop="escapePath">
                        <Input type="text" v-model="ptwData.escapePath"></Input>
                      </FormItem>
                    </Col>
                    <Col span="11">
                      <FormItem label="其他应急处置：" prop="emergencyHandling">
                        <Input type="text" v-model="ptwData.emergencyHandling"></Input>
                      </FormItem>
                    </Col>
                  </Row>
                  <Row type="flex" justify="space-around" class="code-row-bg">
                    <Col span="11">
                      <FormItem
                          :label="this.ptwPlanData.twoLevelOrgId=='18000050'?'站点业务主管部门负责人：':'属地部门安全员：'"
                          prop="belongOrgOfficerName">
                        <Input type="text" v-model="ptwData.belongOrgOfficerName"
                               @on-focus="choosePeople('belongOrgOfficer')"></Input>
                      </FormItem>
                    </Col>
                    <Col span="11">
                    </Col>
                  </Row>
                </Form>
              </div>
            </Card>
            <div style="display:flex;justify-content:center">
              <Button class='ivu-btn-save' v-if="currentWorkId != ''" style="margin-right:20px" @click="submit()">
                保存
              </Button>
              <Button class='ivu-btn-cancel' @click="$router.go(-1)">返回</Button>
            </div>
          </div>
        </Col>
      </Row>
    </div>

    <ptwTicketUserSelect ref="ptwTicketUserSelect" @closeModel="closeModel" @getSelectData="getSelectData"
                         :userForSelectModal="ptwTicketUserForSelectModal" :orgId="companyId">
    </ptwTicketUserSelect>
  </div>
</template>

<script>
import {Api} from '../../../../api/index.js'
import {sessionStorage, cookie} from '../../../../common/cacheUtils.js'
import cascaderDom from "../../../../components/cascader-dom.vue"
import PtwTicketUserSelect from './ptwTicketUserSelect.vue'

export default {
  components: {
    cascaderDom,
    PtwTicketUserSelect
  },
  data() {
    return {
      imgs: [],
      companyId: "",
      currentTaskName: "",
      detailRow1: 'detailRow1',
      detailRow2: 'detailRow2',
      loadingModel: true,
      nodeSignFileList: [],
      signFileList: [],
      signPhotoFileList: [],
      currentNode: "",
      taskInfo: {},
      user: {},
      upUrl: "",
      workGrades: [
        {codingCodeId: "ptw-100003000000001", codingName: "一级"},
        {codingCodeId: "ptw-100003000000002", codingName: "二级"},
        {codingCodeId: "ptw-100003000000003", codingName: "三级"}
      ],
      highWorkGrades: [
        {codingCodeId: "ptw-100003000000001", codingName: "特级：＞30米"},
        {codingCodeId: "ptw-100003000000002", codingName: "三级：15-30米"},
        {codingCodeId: "ptw-100003000000003", codingName: "二级：5-15米"},
        {codingCodeId: "ptw-100003000000004", codingName: "一级：2—5米"}
      ],
      fireWorkGrades: [
        {codingCodeId: "ptw-100003000000001", codingName: "特殊动火"},
        {codingCodeId: "ptw-100003000000002", codingName: "一级动火"},
        {codingCodeId: "ptw-100003000000003", codingName: "二级动火"}
      ],
      confinedSpaceWorkGrades: [
        {codingCodeId: "ptw-100003000000001", codingName: "特级"},
        {codingCodeId: "ptw-100003000000002", codingName: "一级"},
        {codingCodeId: "ptw-100003000000003", codingName: "二级"}
      ],
      soilWorkGrades: [
        {codingCodeId: "ptw-100003000000001", codingName: "主干道"},
        {codingCodeId: "ptw-100003000000002", codingName: "次干道"},
      ],
      workTypes: [
        {codingCodeId: "ptw-100002000000001", codingName: "运行"},
        {codingCodeId: "ptw-100002000000002", codingName: "停机"},
        {codingCodeId: "ptw-100002000000003", codingName: "检修"},
        {codingCodeId: "ptw-100002000000004", codingName: "其他"}
      ],
      taskName: "",
      fileId: "",
      buttonloading: false,
      beforeGasDatas: [],
      relatedPartyDatas: [],
      viewRelatedPartyColumn: [
        {
          type: 'index',
          width: 80,
          align: 'center',
          title: '序号',
        },
        {
          title: '相关方',
          minWidth: 120,
          align: 'center',
          key: 'relatedPartyName'
        },
        {
          title: '联系人',
          minWidth: 100,
          align: 'center',
          key: 'contactPerson'
        },
        {
          title: '联系电话',
          minWidth: 120,
          align: 'center',
          key: 'contactPhone'
        }
      ],
      ptwWorkerDatas: [],
      viewPtwWorkerColumn: [
        {
          type: 'index',
          width: 80,
          align: 'center',
          title: '序号',
        },
        {
          title: '作业人员',
          minWidth: 120,
          align: 'center',
          key: 'userName',
        },
        {
          title: '人员类型',
          width: 100,
          align: 'center',
          key: 'userType',
          render: (h, params) => {
            return h('div', params.row.userType == '1' ? '高处作业' :
                params.row.userType == '2' ? '焊工作业' :
                    params.row.userType == '2' ? '起重作业' :
                        params.row.userType == '2' ? '电工作业' : '')
          }
        },
        {
          title: '证件号',
          minWidth: 120,
          align: 'center',
          key: 'userNumber',
        }
      ],
      relatedPartyColumn: [
        {
          type: 'index',
          width: 80,
          align: 'center',
          title: '序号',
        },
        {
          title: '相关方',
          minWidth: 120,
          align: 'center',
          slot: 'relatedPartyName',
        },
        {
          title: '联系人',
          minWidth: 100,
          align: 'center',
          slot: 'contactPerson',
        },
        {
          title: '联系电话',
          minWidth: 120,
          align: 'center',
          slot: 'contactPhone',
        },
        {
          title: '操作',
          slot: 'actions',
          align: 'center',
          //  fixed: 'right',
          minWidth: 100
        }
      ],
      ptwWorkerColumn: [
        {
          type: 'index',
          width: 80,
          align: 'center',
          title: '序号',
        },
        {
          title: '作业人员',
          minWidth: 120,
          align: 'center',
          slot: 'userName',
        },
        {
          title: '人员类型',
          width: 120,
          align: 'center',
          slot: 'userType',
        },
        {
          title: '证件号',
          minWidth: 120,
          align: 'center',
          slot: 'userNumber',
        },
        {
          title: '操作',
          slot: 'actions',
          align: 'center',
          minWidth: 120,
        }
      ],
      youxianGasColumn: [
        {
          type: 'index',
          minWidth: 70,
          align: 'center',
          title: '序号',
        },
        {
          title: '检测时间',
          minWidth: 170,
          align: 'center',
          key: 'checkTime',
          render: (h, params) => {
            return h('div', [(this.formatDate(new Date(params.row.checkTime), 'yyyy-MM-dd'))]);
          }
        },
        {
          title: '检测部位',
          minWidth: 100,
          align: 'center',
          key: 'checkSite'
        },
        {
          title: 'O2 19.5%-23.5%',
          minWidth: 80,
          align: 'center',
          key: 'oxygenConcen'
        },
        {
          title: 'CO 24ppm',
          minWidth: 80,
          align: 'center',
          key: 'toxicGasConcen'
        },
        {
          title: 'H2S 10mg/m3',
          minWidth: 80,
          align: 'center',
          key: 'combGasConcen'
        },
        {
          title: '检测结论',
          minWidth: 100,
          align: 'center',
          slot: 'checkResult'
        },
        {
          title: '检测人',
          minWidth: 120,
          align: 'center',
          slot: 'checkUserSign'
        },
      ],
      donghuoGasColumn: [
        {
          type: 'index',
          minWidth: 70,
          align: 'center',
          title: '序号',
        },
        {
          title: '检测时间',
          minWidth: 170,
          align: 'center',
          key: 'checkTime',
          render: (h, params) => {
            return h('div', [(this.formatDate(new Date(params.row.checkTime), 'yyyy-MM-dd'))]);
          }
        },
        {
          title: '检测部位',
          minWidth: 100,
          align: 'center',
          key: 'checkSite'
        },
        {
          title: 'O2 19.5%-23.5%',
          minWidth: 80,
          align: 'center',
          key: 'oxygenConcen'
        },
        {
          title: 'CO 24ppm',
          minWidth: 80,
          align: 'center',
          key: 'toxicGasConcen'
        },
        {
          title: '可燃气体（V%LEL） 20%-50%',
          minWidth: 80,
          align: 'center',
          key: 'combGasConcen'
        },
        {
          title: '检测结论',
          minWidth: 80,
          align: 'center',
          slot: 'checkResult'
        },
        {
          title: '检测人',
          minWidth: 120,
          align: 'center',
          slot: 'checkUserSign'
        }
      ],
      lengjiGasColumn: [
        {
          type: 'index',
          minWidth: 70,
          align: 'center',
          title: '序号',
        },
        {
          title: '检测时间',
          minWidth: 170,
          align: 'center',
          key: 'checkTime',
          render: (h, params) => {
            return h('div', [(this.formatDate(new Date(params.row.checkTime), 'yyyy-MM-dd'))]);
          }
        },
        {
          title: '检测部位',
          minWidth: 100,
          align: 'center',
          key: 'checkSite'
        },
        {
          title: 'O2 19.5%-23.5%',
          minWidth: 80,
          align: 'center',
          key: 'oxygenConcen'
        },
        {
          title: 'CO 24ppm',
          minWidth: 80,
          align: 'center',
          key: 'toxicGasConcen'
        },
        {
          title: '45°C',
          minWidth: 80,
          align: 'center',
          key: 'temperature'
        },
        {
          title: '检测结论',
          minWidth: 80,
          align: 'center',
          slot: 'checkResult'
        },
        {
          title: '检测人',
          minWidth: 120,
          align: 'center',
          slot: 'checkUserSign'
        }
      ],
      ruleCustom: {
        opinion: [{
          validator: (rule, value, callback) => {
            if (this.showdata.opinion == null || this.showdata.opinion == '' || this.showdata.opinion == undefined) {
              callback(' ')
            } else {
              callback()
            }
          },
          required: true,
          trigger: 'change, blur'
        }],
        route: [
          {required: true, message: '  ', trigger: 'blur'}
        ],
        belongOrgLeaderName: [{
          validator: (rule, value, callback) => {
            if (this.ptwData.belongOrgLeaderName == null || this.ptwData.belongOrgLeaderName == '' || this.ptwData.belongOrgLeaderName == undefined) {
              callback(' ')
            } else {
              callback()
            }
          },
          required: true,
          trigger: 'change'
        }],
        belongOrgOfficerName: [{
          validator: (rule, value, callback) => {
            if (this.ptwData.belongOrgOfficerName == null || this.ptwData.belongOrgOfficerName == '' || this.ptwData.belongOrgOfficerName == undefined) {
              callback(' ')
            } else {
              callback()
            }
          },
          required: true,
          trigger: 'change'
        }],
        bussinessDeptName: [{
          validator: (rule, value, callback) => {
            if (this.ptwData.bussinessDeptName == null || this.ptwData.bussinessDeptName == '' || this.ptwData.bussinessDeptName == undefined) {
              callback(' ')
            } else {
              callback()
            }
          },
          required: true,
          trigger: 'change'
        }],
        deptPrincipalName: [{
          validator: (rule, value, callback) => {
            if (this.ptwData.deptPrincipalName == null || this.ptwData.deptPrincipalName == '' || this.ptwData.deptPrincipalName == undefined) {
              callback(' ')
            } else {
              callback()
            }
          },
          required: true,
          trigger: 'change'
        }],
        securityDeptName: [{
          validator: (rule, value, callback) => {
            if (this.ptwData.securityDeptName == null || this.ptwData.securityDeptName == '' || this.ptwData.securityDeptName == undefined) {
              callback(' ')
            } else {
              callback()
            }
          },
          required: true,
          trigger: 'change'
        }],
        securityDirectName: [{
          validator: (rule, value, callback) => {
            if (this.ptwData.securityDirectName == null || this.ptwData.securityDirectName == '' || this.ptwData.securityDirectName == undefined) {
              callback(' ')
            } else {
              callback()
            }
          },
          required: true,
          trigger: 'change'
        }],
        chargeLeaderName: [{
          validator: (rule, value, callback) => {
            if (this.ptwData.chargeLeaderName == null || this.ptwData.chargeLeaderName == '' || this.ptwData.chargeLeaderName == undefined) {
              callback(' ')
            } else {
              callback()
            }
          },
          required: true,
          trigger: 'change'
        }]
      },
      ptwRuleCustom: {
        adminDept: [
          {required: true, message: '  ', trigger: 'blur'}
        ],
        adminDeptExpediter: [
          {required: true, message: '  ', trigger: 'blur'}
        ],
        workDept: [
          {required: true, message: '  ', trigger: 'blur'}
        ],
        colonyDept: [
          {required: true, message: '  ', trigger: 'blur'}
        ],
        workType: [
          {required: true, message: '  ', trigger: 'blur'}
        ],
        workGrade: [
          {required: true, message: '  ', trigger: 'blur'}
        ],
        applyStartDate: [
          {required: true, message: '  ', trigger: 'blur'}
        ],
      },
      bodyHeight: 0,
      viewFlag: false,
      flag: false,
      approveFlag: '',
      approveList: [{
        text: "通过",
        value: "1"
      },
        {
          text: "不通过",
          value: "2"
        }],
      showdata: {route: '1'},
      tableHeight: 450,
      currentWorkId: '',
      file: null,
      fileName: null,
      downloadUrl: Api.downloadMongoFile,
      visiblePeople: false,
      others: [],
      modelData: {},
      ptwPlanData: {},
      workItems: [],
      ptwData: {},
      isBelongOrgLeader: false,
      isBussinessDept: false,
      isSecurityDept: false,
      isSecurityDirect: false,
      isChargeLeader: false,
      isDeptPrincipal: false,
      currentChoosePeople: "",
      ptwTicketUserForSelectModal: false
    }
  },
  mounted: function () {
    this.tableHeight = window.innerHeight - 190;
    this.bodyHeight = window.innerHeight - 180
    this.companyId = sessionStorage('userId').getObject('userId').companyId;
    this.taskInfo = this.$route.query;
    this.taskName = this.$route.query.taskName;
    this.currentWorkId = this.taskInfo.workId;
    this.showdata.userName = sessionStorage('userId').getObject('userId').userName;
    this.showdata.createDateStr = this.formatDate(new Date(), 'yyyy-MM-dd');
    if (this.$route.query.close == false) {
      this.$http.get(Api.getUserByUserId + this.$route.query.userId)
          .then(function (res) {
            this.user = res.data.data;
            this.query();
          })
    } else {
      var search = window.location.href.split('?')[1];//截取URL？后面的参数
      var params = {};
      if (search != "" && search != undefined) {
        search.split("&").forEach(
            function (val) {
              var arr = val.split("=");
              params[arr[0]] = arr[1];
            }
        )
      }
      var code = params.code
      var status = params.status
      if (code != null && code != 'undefined') {
        this.$http.get(Api.queryToken, {
          params: {
            code: code,
          }
        }).then(res1 => {
          if (res1.data.errcode == "1014") {
            this.$http.get(Api.getReZheng).then(res2 => {
              window.location.href = decodeURIComponent(res2.bodyText) + "&redirect_uri=" + encodeURIComponent(window.location.href);
            })
          } else {
            this.$http.get(Api.getUserByUserId + this.$route.query.userId)
                .then(function (res) {
                  this.user = res.data.data;
                  this.query();
                })
          }
        })
      } else {
        this.$http.get(Api.getReZheng).then(res2 => {
          window.location.href = decodeURIComponent(res2.bodyText) + "&redirect_uri=" + encodeURIComponent(window.location.href);
        });
      }
    }
  },
  methods: {
    changeType(type) {
      this.ptwPlanData.belongOrgId = "";
      this.ptwPlanData.belongOrgName = "";
    },
    returnTo() {
      if (this.$route.query.close == true)
        window.close();
      else
        this.$router.go(-1);
    },
    beforeUploadConfirmSign(file) {
      let formData = new FormData();
      formData.append("files", file); // 文件对象
      let url = Api.uploadPTWFiles + '/' + this.ptwData.ptwId + '/files/picture/confirm';
      this.$http.post(url, formData).then((res) => {
        if (res.data.result == "success") {
          this.getSignPicture('confirm');
          this.$Message.info("文件上传成功")
        }
      })
      return false;
    },
    beforeUploadSign(file) {
      let formData = new FormData();
      formData.append("files", file); // 文件对象
      let url = Api.uploadPTWFiles + '/' + this.ptwData.ptwId + '/files/picture/' + this.currentNode;
      this.$http.post(url, formData).then((res) => {
        if (res.data.result == "success") {
          this.getNodeSignPicture();
          this.$Message.info("文件上传成功")
        }
      })
      return false;
    },
    beforeUploadFile(file) {
      let formData = new FormData();
      formData.append("file", file);
      this.$http.put(Api.uploadMongoFile, formData).then((res) => {
        if (res.data.result == "success") {
          this.beforeGasDatas[this.currentGasDataIndex].checkUserSign = res.data.id;
          this.getFileInfoById(this.currentGasDataIndex, res.data.id);
          this.$Message.info("文件上传成功")
        }
      })
      return false;
    },
    async queryFormList() {
      await this.$http.get(Api.getProcinstForm + '/' + this.taskInfo.taskId).then(function (response) {
        if (response.data.variables != undefined) {
          this.variables = response.data.variables;
        }
        response.data.formList.forEach(item => {
          if (item.id == "approver") {
            item.enumData.forEach(item1 => {
              if (item1.value == "nextUserId") {
                if (item1.text == "belongOrgLeader")
                  this.isBelongOrgLeader = true;
                if (item1.text == "bussinessDept")
                  this.isBussinessDept = true;
                if (item1.text == "securityDept")
                  this.isSecurityDept = true;
                if (item1.text == "securityDirect")
                  this.isSecurityDirect = true;
                if (item1.text == "chargeLeader")
                  this.isChargeLeader = true;
                if (item1.text == "deptPrincipal")
                  this.isDeptPrincipal = true;
              }
              if (item1.text == "taskName") {
                this.currentTaskName = item1.value;
              }
            })
          }
          if (item.name == "当前节点") {
            this.currentNode = item.id;
          }
        })
      });
    },
    changeResult(result) {
      if (result == '1') {
        this.showdata.opinion = "同意";
        this.visiblePeople = true;
      } else {
        this.showdata.opinion = "";
        this.visiblePeople = false;
      }
    },
    setApproveUserName(data) {
      this.showdata.approveUserName = data;
    },
    setApproveUserId(data) {
      this.showdata.approveUserId = data[data.length - 1];
    },

    setApproveUserName1(data) {
      this.showdata.approveUserName = data;
    },
    setApproveUserId1(data) {
      let userId = "";
      for (let i = 0; i < data.length; i++) {
        userId += data[i]['value'] + ',';
      }
      this.showdata.approveUserId = userId;
    },
    choosePeople(name) {
      this.currentChoosePeople = name;
      this.$refs.ptwTicketUserSelect.reset();
      this.ptwTicketUserForSelectModal = true;
    },
    downloadFile(fileId, fileName) {
      let url = this.downloadUrl + "/" + fileId
      this.$http.get(url, {
        responseType: 'blob' //告诉服务器我们需要的响应格式
      }).then((res) => {
        const aLink = document.createElement("a");
        let blob = new Blob([res.data], {
          type: res.bodyBlob.type //将会被放入到blob中的数组内容的MIME类型
        });
        aLink.href = URL.createObjectURL(blob)
        aLink.download = fileName //标题
        aLink.click()
        document.body.appendChild(aLink)
      })
    },
    beforeUpload(file) {
      this.file = file;
      this.fileName = file.name;
      return false;
    },
    setQueryOrgId(data) {
      this.showdata.orgId = data[data.length - 1];
    },
    setQueryOrgName(data) {
      this.showdata.operateOrg = data;
    },
    getChildPosition(index, itemId, instanceContent) {
      this.others.push({index: index, itemId: itemId, instanceContent: instanceContent})
    },
    async query() {
      await this.queryFormList();
      let url = Api.queryPTWDetail;
      let id = this.taskInfo.workId;
      this.imgs = [];
      this.ptwData = {};
      this.signFileList = [];
      this.signPhotoFileList = [];
      this.nodeSignFileList = [];
      this.ptwClose = {};
      this.ptwSignDatas = {};
      this.$http.get(Api.getPtwProcessByPtwId + '/' + id, {params: {}}).then((res) => {
        this.ptwClose = res.data.ptwClose;
        this.ptwSignDatas = res.data.ptwSignData;
        this.$http.get(Api.getPTWSchemeFile + '/' + this.ptwClose.approverSign).then((res) => {
          this.$set(this.ptwClose, 'approverSignPicture', Api.viewPicture + res.data.filePath);
        })
        this.$http.get(Api.getPTWSchemeFile + '/' + this.ptwClose.closeApplicantSign).then((res) => {
          this.$set(this.ptwClose, 'closeApplicantSignPicture', Api.viewPicture + res.data.filePath);
        })
      })
      this.$http.get(url + '/' + id, {params: {}}).then((res) => {
        this.beforeGasDatas = res.data.beforeGasDatas;
        this.relatedPartyDatas = res.data.relatedParties;
        this.ptwWorkerDatas = res.data.ptwWorkers;
        var index = 0;
        this.beforeGasDatas.forEach(item => {
          this.getFileInfoById(index, item.checkUserSign);
          index++;
        })
        this.ptwData = res.data.ptwData;
        //    this.getSignPicture('confirm');
        this.showdata = res.data.ptwData;
        this.ptwData = res.data.ptwData;
        //    this.getNodeSignPicture();
        this.$http.get(Api.getPtwModelByModelId + "/" + this.showdata.modelId).then((res) => {
          this.modelData = res.data;
        }).catch(e => {
          this.$Message.error("数据获取失败")
        });
        this.$http.get(Api.getPtwPlanById + "/" + this.showdata.planId).then((res) => {
          this.ptwPlanData = res.data;
        }).catch(e => {
          this.$Message.error("数据获取失败")
        });
        this.workItems = res.data.itemData;
        res.data.itemData.map(subitem => {
          let childs = subitem.itemList;
          let rowNum = childs.length / 4;
          subitem.rows = [];
          for (let i = 0; i < rowNum; i++) {
            subitem.rows[i] = [];
            for (let j = 0; j < subitem.itemList.length - i * 4; j++) {
              let flag = (j + 1) % 4;
              let index = i * 4 + j;
              subitem.itemList[index].fileUrl = Api.uploadPTWFiles + '/' + this.ptwData.ptwId + '/files/picture?field=' + subitem.itemList[index].itemId;
              subitem.itemList[index].fileList = [];
              subitem.rows[i].push(subitem.itemList[index]);
              if (flag == 0) {
                break;
              }
            }
          }
          //如果最后一行不满4个，添加空数据补满
          if (subitem.rows.length > 0) {
            let diff = 4 - subitem.rows[subitem.rows.length - 1].length;
            for (let i = 0; i < diff; i++) {
              subitem.rows[subitem.rows.length - 1].push({});
            }
          }
        })
        this.loadingModel = false;
      }).catch(e => {
        console.log(e)
        this.loadingModel = false;
        this.$Message.error("数据获取失败")
      })
      this.$http.get(Api.uploadPTWFiles + '/' + id + '/filePaths/picture').then((imgRes) => {
        this.imgs = imgRes.data.data;
        this.imgs.forEach(item => {
          item.allPath = Api.viewPicture + item.filePath;
          if (item.field == "confirm") {
            this.signFileList.push(item);
          } else if (item.field == "confirmPhoto") {
            this.signPhotoFileList.push(item);
          } else if (item.field == this.currentNode) {
            this.nodeSignFileList.push(item);
          }
        })
      })
    },
    async approvalUpdateInfo() {
      this.$Modal.confirm({
        title: '提示信息',
        content: '<p>上报前请确认已保存该作业票</p>',
        okText: '确认',
        onOk: () => {
          let data = {};
          data = {
            createUserId: this.user.userId,
            userName: this.user.userName,
            opinion: this.showdata.opinion,
            taskId: this.taskInfo.taskId,
            procinstId: this.taskInfo.procinstId,
            workId: this.taskInfo.workId,
            currentTask: this.taskInfo.currentTask,
            formKey: 'ptwTicketForApproval',
            route: "1"
          };
          this.$http.get(Api.taskComplete, {params: data}).then((res) => {
            this.buttonloading1 = false;
            if (res.data.status == '200') {
              this.$Message.success("审批成功")
              this.returnTo();
            } else {
              this.$Message.success("审批失败")
            }
          }).catch(e => {
            this.buttonloading1 = false;
            this.$Message.error("数据获取失败")
          })
        }
      });
    },
    closeModel() {
      this.ptwTicketUserForSelectModal = false;
    },
    beforeUploadEleWorkerNameSign(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "eleWorkerNameSign." + ext);
      this.beforeUploadSign(file1);
      return false;
    },
    beforeUploadEleCheckerNameSign(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "eleCheckerNameSign." + ext);
      this.beforeUploadSign(file1);
      return false;
    },
    beforeUploadWorkPeopleSign(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "workPeopleSign." + ext);
      this.beforeUploadConfirmSign(file1);
      return false;
    },
    beforeUploadBrokenExplainPhoto(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "file." + ext);
      this.beforeUploadConfirmSign(file1);
      return false;
    },
    beforeUploadSiteGuarderSign(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "siteGuarderSign." + ext);
      this.beforeUploadConfirmSign(file1);
      return false;
    },
    beforeUploadWorkChargeSign(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "workChargeSign." + ext);
      this.beforeUploadConfirmSign(file1);
      return false;
    },
    beforeUploadChargePeopleSign(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "chargePeople." + ext);
      this.beforeUploadConfirmSign(file1);
      return false;
    },
    beforeUploadTechnicianSign(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "technician." + ext);
      this.beforeUploadConfirmSign(file1);
      return false;
    },
    beforeUploadSecurityGuardSign(file) {
      var index = file.name.lastIndexOf(".");
      //获取后缀
      var ext = file.name.substr(index + 1);
      var file1 = new File([file], "securityGuard." + ext);
      this.beforeUploadConfirmSign(file1);
      return false;
    },
    getSelectData(user) {
      if (this.currentChoosePeople == 'belongOrgOfficer') {
        this.showdata.nextUserId = user.userId
        this.showdata.belongOrgOfficerName = user.userName
      }
      if (this.currentChoosePeople == 'belongOrgLeader') {
        this.showdata.nextUserId = user.userId
        this.showdata.belongOrgLeaderName = user.userName
      }
      if (this.currentChoosePeople == 'bussinessDept') {
        this.showdata.nextUserId = user.userId
        this.showdata.bussinessDeptName = user.userName
      }
      if (this.currentChoosePeople == 'securityDept') {
        this.showdata.nextUserId = user.userId
        this.showdata.securityDeptName = user.userName
      }
      if (this.currentChoosePeople == 'securityDirect') {
        this.showdata.nextUserId = user.userId
        this.showdata.securityDirectName = user.userName
      }
      if (this.currentChoosePeople == 'chargeLeader') {
        this.showdata.nextUserId = user.userId
        this.showdata.chargeLeaderName = user.userName
      }
      if (this.currentChoosePeople == 'deptPrincipal') {
        this.showdata.nextUserId = user.userId
        this.showdata.deptPrincipalName = user.userName
      }
      this.ptwTicketUserForSelectModal = false;
    },
    beforeGasRemove(index, id) {
      let url = Api.uploadPTWFiles + '/file/' + id;
      this.$http.delete(url).then((res) => {
        this.beforeGasDatas.splice(index, 1);
      })
    },
    signPhotoRemove(index, id) {
      let url = Api.uploadPTWFiles + '/file/' + id;
      this.$http.delete(url).then((res) => {
        this.signPhotoFileList.splice(index, 1);
      })
    },
    signFileRemove(index, id) {
      let url = Api.uploadPTWFiles + '/file/' + id;
      this.$http.delete(url).then((res) => {
        this.signFileList.splice(index, 1);
      })
    },
    nodeSignFileRemove(index, id) {
      let url = Api.uploadPTWFiles + '/file/' + id;
      this.$http.delete(url).then((res) => {
        this.nodeSignFileList.splice(index, 1);
      })
    },
    controlRemove(rowIndex, childIndex, index, id) {
      let url = Api.uploadPTWFiles + '/file/' + id;
      this.$http.delete(url).then((res) => {
        this.workItems.rows[rowIndex][childIndex].splice(index, 1);
      })
    },
    approvalInfo() {
      this.$refs['showdata'].validate((valid) => {
        if (valid) {
          this.loadingModel = true;
          let userJson = this.user;
          var grade = '1';
          if (this.ptwData.workGrade == 'ptw-100003000000001')
            grade = '1';
          else if (this.ptwData.workGrade == 'ptw-100003000000002')
            grade = '2';
          else if (this.ptwData.workGrade == 'ptw-100003000000003')
            grade = '3';
          else if (this.ptwData.workGrade == 'ptw-100003000000004')
            grade = '4';
          let data = {
            createUserId: userJson.userId,
            userName: userJson.userName,
            opinion: this.showdata.opinion,
            taskId: this.$route.query.taskId,
            procinstId: this.$route.query.procinstId,
            route: this.showdata.route,
            workId: this.taskInfo.workId,
            grade: grade,
            nextUserId: this.showdata.nextUserId,
            currentTask: this.currentNode
          };
          this.$http.get(Api.taskComplete, {params: data}).then((res) => {
            if (res.data.status == '200') {
              this.$Message.success("审批成功")
              this.returnTo();
            } else {
              this.$Message.success("审批失败")
              this.loadingModel = false;
            }
          }).catch(e => {
            this.loadingModel = false;
            this.$Message.error("数据获取失败")
          })
        } else {
          this.$Message.error('请填报完整!');
        }
      })
    },
    getFileInfoById(index, id) {
      if (id != null) {
        this.$http.get(Api.getMongoFileNoBase64Info + '/' + id).then((imgRes) => {
          imgRes.data.allPath = Api.viewPicture + imgRes.data.filePath;
          this.$set(this.beforeGasDatas[index], 'file', imgRes.data);
        })
      }
    },
    submit() {
      return this.$refs["ptwData"].validate((valid) => {
        if (valid) {
          let updateDatas = {};
          let itemData = [];
          for (let i = 0; i < this.workItems.length; i++) {
            for (let j = 0; j < this.workItems[i].rows.length; j++) {
              for (let x = 0; x < this.workItems[i].rows[j].length; x++) {
                if (this.workItems[i].rows[j][x].dataType == '3' && this.workItems[i].rows[j][x].instanceContent == undefined) {
                  this.$Message.error('未填写必填项');
                  return false;
                }
              }
            }
          }
          for (let i = 0; i < this.workItems.length; i++) {
            for (let j = 0; j < this.workItems[i].rows.length; j++) {
              for (let x = 0; x < this.workItems[i].rows[j].length; x++) {
                let obj = {};
                if (this.workItems[i].rows[j][x].instanceContent == true || this.workItems[i].rows[j][x].instanceContent == "true") {
                  obj = {itemId: this.workItems[i].rows[j][x].itemId, instanceContent: "1"};
                } else
                  obj = {
                    itemId: this.workItems[i].rows[j][x].itemId,
                    instanceContent: this.workItems[i].rows[j][x].instanceContent
                  };
                itemData.push(obj);
              }
            }
          }
          updateDatas.itemData = itemData;
          this.ptwData.planId = this.currentPlanId;
          updateDatas.ptw = this.ptwData;
          updateDatas.beforeGasDatas = this.beforeGasDatas;
          updateDatas.relatedParties = this.relatedPartyDatas;
          updateDatas.ptwWorkers = this.ptwWorkerDatas;
          this.$http.post(Api.saveOrUpdatePtw, updateDatas).then((res1) => {
            if (res1.data.result == 'success') {
              this.$Message.success('保存成功');
              console.log("111")
              return true;
            }
          }).catch(e => {
            this.$Message.error("数据获取失败")
            return false;
          })
        } else {
          this.$Message.error('不能为空!');
          return false;
        }
      })
    },
    handleCancel() {
      this.showdata = {route: '1'};
      this.$router.back();
    },
    getSignPicture(field) {
      this.$http.get(Api.uploadPTWFiles + '/' + this.ptwData.ptwId + '/filePaths/picture?field=' + field).then((imgRes) => {
        imgRes.data.data.forEach(item => {
          item.allPath = Api.viewPicture + item.filePath;
        })
        this.signFileList = imgRes.data.data;
      })
      this.$http.get(Api.uploadPTWFiles + '/' + this.ptwData.ptwId + '/filePaths/picture?field=confirmPhoto').then((imgRes) => {
        imgRes.data.data.forEach(item => {
          item.allPath = Api.viewPicture + item.filePath;
        })
        this.signPhotoFileList = imgRes.data.data;
      })
    },
    getNodeSignPicture() {
      if (this.currentNode != "")
        this.$http.get(Api.uploadPTWFiles + '/' + this.ptwData.ptwId + '/filePaths/picture?field=' + this.currentNode).then((imgRes) => {
          imgRes.data.data.forEach(item => {
            item.allPath = Api.viewPicture + item.filePath;
          })
          this.nodeSignFileList = imgRes.data.data;
        })
    },
    addGas() {
      let item = {
        combGasConcen: 1,
        checkTime: '',
        checkSite: '',
        oxygenConcen: 1,
        toxicGasConcen: 1,
        checkResult: '',
        temperature: '',
        fileList: []
      }
      this.beforeGasDatas.push(item);
    },
    deleteGas(index) {
      if (this.beforeGasDatas[index].gasCheckId != null && this.beforeGasDatas[index].gasCheckId != undefined && this.beforeGasDatas[index].gasCheckId != "") {
        this.$http.delete(Api.deleteGasById + "/" + this.beforeGasDatas[index].gasCheckId).then((res) => {
        }).catch(e => {
          this.$Message.error("数据删除失败")
        })
      }
      this.beforeGasDatas.splice(index, 1);
    },
    addPtwWorker() {
      let item = {userName: null, userType: null, userNumber: null};

      this.ptwWorkerDatas.push(item);
    },
    deletePtwWorker(index) {
      this.$Modal.confirm({
        title: '数据删除',
        content: '<p>确定删除该条信息</p>',
        okText: '确认',
        onOk: () => {
          if (this.ptwWorkerDatas[index].id != null && this.ptwWorkerDatas[index].id != undefined && this.ptwWorkerDatas[index].id != "") {
            this.$http.delete(Api.deletePtwWorkerById + "/" + this.ptwWorkerDatas[index].id).then((res) => {
            }).catch(e => {
              this.$Message.error("数据删除失败")
            })
          }
          this.ptwWorkerDatas.splice(index, 1);
        },
        cancelText: '取消'
      });
    },
    addRelatedParty() {
      let item = {contactPerson: null, relatedPartyName: null, contactPhone: null};
      this.relatedPartyDatas.push(item);
    },
    deleteRelatedParty(index) {
      this.$Modal.confirm({
        title: '数据删除',
        content: '<p>确定删除该条信息</p>',
        okText: '确认',
        onOk: () => {
          this.relatedPartyDatas.splice(index, 1);
          if (this.relatedPartyDatas[index].id != "" && this.relatedPartyDatas[index].id != null && this.relatedPartyDatas[index].id != undefined) {
            this.$http.delete(Api.deleteRelatedPartyById + "/" + this.relatedPartyDatas[index].id).then((res) => {
            }).catch(e => {
              this.$Message.error("数据删除失败")
            })
          }
        },
        cancelText: '取消'
      });
    },
    changeDate(date) {
      if (this.ptwData.applyEndDate != undefined && this.ptwData.applyEndDate != '' &&
          this.ptwData.applyStartDate != undefined && this.ptwData.applyStartDate != '') {
        if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) == 0) {
          this.$Message.error("作业结束时间不能早于开始时间");
          return;
        }
        if (this.modelData.modelType == 'ptw-100001000000001') {
          if (this.ptwData.workGrade == 'ptw-100003000000001')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 8) {
              this.$Message.error("一级吊装作业许可证有效期不能超过8小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000002')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 24) {
              this.$Message.error("一级吊装作业许可证有效期不能超过24小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000003')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 48) {
              this.$Message.error("一级吊装作业许可证有效期不能超过48小时");
              return;
            }
        }
        if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) == 0) {
          this.$Message.error("作业结束时间不能早于开始时间");
          return;
        }
        if (this.modelData.modelType == 'ptw-100001000000001') {
          if (this.ptwData.workGrade == 'ptw-100003000000001')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 24) {
              this.$Message.error("一级吊装作业许可证有效期不能超过24小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000002')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 48) {
              this.$Message.error("一级吊装作业许可证有效期不能超过48小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000003')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 72) {
              this.$Message.error("一级吊装作业许可证有效期不能超过72小时");
              return;
            }
        }
        if (this.modelData.modelType == 'ptw-100001000000002' || this.modelData.modelType == 'ptw-100001000000003') {
          if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 8) {
            if (this.modelData.modelType == 'ptw-100001000000002')
              this.$Message.error("清库清仓作业许可证有效期不能超过8小时");
            else
              this.$Message.error("有限空间作业许可证有效期不能超过8小时");
            return;
          }
        }
        if (this.modelData.modelType == 'ptw-100001000000004') {
          if (this.ptwData.workGrade == 'ptw-100003000000001')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 8) {
              this.$Message.error("特级高处作业许可证有效期不能超过8小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000002')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 24) {
              this.$Message.error("三级高处作业许可证有效期不能超过24小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000003')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 48) {
              this.$Message.error("二级高处作业许可证有效期不能超过48小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000004')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 72) {
              this.$Message.error("一级高处作业许可证有效期不能超过72小时");
              return;
            }
        }
        if (this.modelData.modelType == 'ptw-100001000000005') {
          if (this.ptwData.workGrade == 'ptw-100003000000001')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 8) {
              this.$Message.error("特殊动火作业许可证有效期不能超过8小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000002')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 8) {
              this.$Message.error("一级动火作业许可证有效期不能超过8小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000003')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 24) {
              this.$Message.error("二级动火作业许可证有效期不能超过24小时");
              return;
            }
        }
        if (this.modelData.modelType == 'ptw-100001000000006') {
          if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 12) {
            this.$Message.error("预热器清堵作业许可证有效期不能超过12小时");
            return;
          }
        }
        if (this.modelData.modelType == 'ptw-100001000000007') {
          if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 8) {
            this.$Message.error("篦冷机清大块作业许可证有效期不能超过8小时");
            return;
          }
        }
        if (this.modelData.modelType == 'ptw-100001000000008') {
          if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 15 * 24) {
            this.$Message.error("临时用电作业许可证有效期不能超过15天");
            return;
          }
        }
        if (this.modelData.modelType == 'ptw-100001000000009' || this.modelData.modelType == 'ptw-100001000000010') {
          if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 48) {
            if (this.modelData.modelType == 'ptw-100001000000009')
              this.$Message.error("高温作业许可证有效期不能超过48小时");
            else
              this.$Message.error("交叉作业许可证有效期不能超过48小时");
            return;
          }
        }
        if (this.modelData.modelType == 'ptw-100001000000011') {
          if (this.ptwData.workGrade == 'ptw-100003000000001')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 48) {
              this.$Message.error("交通主干道动土作业许可证有效期不能超过48小时");
              return;
            }
          if (this.ptwData.workGrade == 'ptw-100003000000002')
            if (this.getHour(this.ptwData.applyStartDate, this.ptwData.applyEndDate) > 72) {
              this.$Message.error("交通次干道动土作业许可证有效期不能超过72小时");
              return;
            }
        }
      }
    },
    beforeUploadConfirmPhoto(file) {
      let formData = new FormData();
      formData.append("files", file); // 文件对象
      let url = Api.uploadPTWFiles + '/' + this.ptwData.ptwId + '/files/picture/confirmPhoto';
      this.$http.post(url, formData).then((res) => {
        if (res.data.result == "success") {
          this.getSignPicture('confirm');
          this.$Message.info("文件上传成功")
        }
      })
      return false;
    },
    getHour(s1, s2) {
      s1 = new Date(s1);
      s2 = new Date(s2);
      var ms = s2.getTime() - s1.getTime();
      if (ms <= 0) return 0;
      return ms / 1000 / 60 / 60;
    },
    formatDate(date, fmt) {
      if (/(y+)/.test(fmt)) {
        fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
      }
      let o = {
        'M+': date.getMonth() + 1,
        'd+': date.getDate(),
        'h+': date.getHours(),
        'm+': date.getMinutes(),
        's+': date.getSeconds()
      };
      for (let k in o) {
        if (new RegExp(`(${k})`).test(fmt)) {
          let str = o[k] + '';
          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str));
        }
      }
      return fmt;
    },
    padLeftZero(str) {
      return ('00' + str).substr(str.length);
    },
  },
}
</script>
<style lang='css' scoped>
@import '../../../../index.css';

.ivu-checkbox-disabled + span {
  color: black;
  cursor: not-allowed;
}

.model-list-css {
  width: 190px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.model-list-css >>> .ivu-card-body {
  padding: 0;
  height: 100%;
  flex: auto;
}

.modelSub {
  margin-top: 10px;
}

.detailRow1 {
  border: 1px solid #E0E0EC;
  font-size: 12px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  line-height: 2;
}

.detailRow2 {
  background: rgba(248, 248, 249, 1);
  border-right: 1px solid #E0E0EC;
  border-left: 1px solid #E0E0EC;
  font-size: 12px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  line-height: 2;
}

.tableClass {
}

.tableClass >>> .ivu-table td {
  vertical-align: middle;
}

.tableClass >>> .ivu-table th {
  vertical-align: middle;
}

.tableClass >>> .ivu-input-suffix i {
  font-size: 16px;
  line-height: 50px;
  color: #808695;
}


.tableClass >>> .ivu-input {
  border-radius: 0px;
  vertical-align: middle;
  height: 100%;
}

.tableClass >>> textarea.ivu-input {
  height: 100%;
  vertical-align: middle;
}

.tableClass >>> ivu-date-picker {
  height: 100%;
  vertical-align: middle;
}

.tableClass >>> .ivu-table-cell {
  padding-left: 0px;
  padding-right: 0px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-all;
  box-sizing: border-box;
  height: 100%;
  /*flex 布局*/
  display: flex;
  /*实现垂直居中*/
  align-items: center;
  /*实现水平居中*/
  justify-content: center;
  text-align: justify;
}

.tableClass >>> .ivu-date-picker {
  height: 100%;
}

.tableClass >>> .ivu-date-picker {
  height: 100%;
}

.tableClass >>> .ivu-input-wrapper {
  height: 100%;
}

.tableClass >>> .ivu-date-picker-rel {
  height: 100%;
}

.tableClass >>> .ivu-input-icon {
  line-height: 50px;
}


.changeStyle {
  color: #E53935;
  background-color: #fff;
}

.PtwModelListClass {
}

.PtwModelListClass .wenben:hover {
  cursor: pointer
}

.PtwModelListClass .ivu-checkbox-disabled + span {
  color: black;
}

.PtwModelListClass .ivu-radio-disabled:hover .ivu-radio-inner {
  color: black;
}

.PtwModelListClass .ivu-radio-disabled:hover .ivu-radio-inner {
  border: 1px solid black;
}

.PtwModelListClass .ivu-checkbox-disabled:hover .ivu-checkbox-inner {
  border-color: black;
}

.PtwModelListClass >>> .ivu-radio-disabled .ivu-radio-inner:after {
  background-color: black;
}

.PtwModelListClass >>> .ivu-checkbox-disabled.ivu-checkbox-checked .ivu-checkbox-inner:after {
  animation-name: none;
  border-color: black;
}
</style>
